#include<stdio.h>

int main(int argc, char** argv) {
	int card;
	int slot;
	if(argv[1][0] == '1') {
		scanf("%d %d", &card, &slot);
	}
	while(1) {
		printf("1\nI\n0\n");
		scanf("%d %d", &card, &slot);
	}
}